//
//  NSScannerViewController.m
//  iOSCodeLearning
//
//  Created by TFAppleWork-Summer on 2017/12/14.
//  Copyright © 2017年 Ace. All rights reserved.
//

#import "NSScannerViewController.h"

@interface NSScannerViewController ()

@end

@implementation NSScannerViewController

- (void)viewDidLoad {
    [super viewDidLoad];

}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    [self p_simpleUsing];
}

/**
 简单使用
 */
- (void)p_simpleUsing{
    
    float aFloat = 3;
    NSScanner *theScanner = [[NSScanner alloc]initWithString:@"asd653.5fad"];
    while ([theScanner isAtEnd] == NO) {
        [theScanner scanFloat:&aFloat ];
        NSLog(@"%f",aFloat);
    }
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}



@end
